package com.yupi.yupicturebackend.api.aliyunai.model.test2Image;

import cn.hutool.core.annotation.Alias;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.io.Serializable;


@Data
/**
 * JsonInclude指定序列化时仅包含非空字段。
 * 忽略值为 null 的字段，避免生成冗余的 JSON 数据。
 */
//@JsonInclude(JsonInclude.Include.NON_NULL)
public class CreateText2ImageRequest implements Serializable {
    private static final long serialVersionUID = 1L;  // 主类
    private String model =  "wanx-ast";
    private Input input;
    private Parameters parameters;

    @Data
//    @JsonInclude(JsonInclude.Include.NON_NULL)
    public static class Input {
//        private static final long serialVersionUID = 2L;  // 内部类用不同值
        private String[] title;
        private String[] subtitle;
        private String[] text;

        @Alias("image_url")
        private String imageUrl;

        private Integer underlay;
        private String logo;
    }

    @Data
//    @JsonInclude(JsonInclude.Include.NON_NULL)
    public static class Parameters implements Serializable{
//        private static final long serialVersionUID = 3L;  // 内部类用不同值
        private Integer n;
        private Double temperature;
    }
}